package com.dhcc.bpm.alarm.config;

public enum ExecMethod {
    SHELL("shell脚本", "01"), SQL("sql脚本", "02"), GATEWAY("网关脚本", "03");
    private final String value;
    private String key;
    // 构造方法
    private ExecMethod(String value, String key) {
        this.value = value;
        this.key = key;
    }
    // 普通方法
    public static String getValue(String key) {
        for (ExecMethod c : ExecMethod.values()) {
            if (c.getKey().equals(key)) {
                return c.value;
            }
        }
        return "";
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getValue() {
        return value;
    }

}
